<template>
	<view>
		<view class="paysuccess">支付成功</view>
		<view class="payment">
			<view class="paytext">实付</view>
			<view class="payprice" v-if="type==2">{{price}}积分</view>
			<view class="payprice" v-if="type==1">￥{{price}}</view>
		</view>
		<view class="dotted">
			<image style="width: 630rpx; height: 2rpx;" src="../../static/pay/dotted.png" mode="widthFix"></image>
		</view>
		<view class="look" @click="dindancon">查看订单</view>
		<view class="comeback" @click="goback">返回首页</view>
	</view>
</template>

<script>
	export default{
		data() {
			return {
				price:"",
				type:0,
				code:"",
				orderType:0//1拼团订单 0正常订单
			}
		},
		onLoad(e) {
			if(e.orderType){
				this.orderType=e.orderType
			}
			this.price=e.price
			this.type=e.type
			this.code=e.code
			
		},
		methods: {
			goback(){
				uni.switchTab({
					url:"/pages/index/index"
				})
			},
			dindancon(){
				let url="/pages/details/orderdetails?code="+this.code
				if(this.orderType==1){
					url="/pages/details/orderdetails?type=0&code="+this.code
				}
				uni.navigateTo({
					url:url
				})
			}
		},
	}
</script>

<style scoped="">
	.paysuccess{
		width: 630rpx;
		height: 74rpx;
		margin: 150rpx auto 0;
		font-size: 53rpx;
		font-weight: 400;
		line-height: 74rpx;
		color: #000000;
	}
	.payment{
		display: flex;
		align-items: center;
		width: 630rpx;
		margin: 30rpx auto 0;
	}
	.paytext{
		font-size: 35rpx;
		font-weight: 400;
		color: #000000;
	}
	.payprice{
		margin-left: 21rpx;
		font-size: 32rpx;
		font-weight: 400;
		color:#F0812D ;
	}
	.dotted{
		width: 630rpx;
		margin: 42rpx auto 0;
		height: 4rpx;
		display: flex;
		align-items: center;
	}
	.look{
		width: 630rpx;
		height: 88rpx;
		border-radius: 62rpx;
		background: linear-gradient(90deg, #F3C44E 0%, #F18D29 53%, #ED6138 100%);
		margin: 100rpx auto 50rpx;
		line-height: 88rpx;
		text-align: center;
		font-size: 32rpx;
		font-weight: 400;
		color: #FFFFFF;
	}
	.comeback{
		width: 630rpx;
		height: 88rpx;
		border-radius: 62rpx;
		border: 1px solid #999999;
		margin: 0 auto;
		line-height: 88rpx;
		text-align: center;
		font-size: 32rpx;
		font-weight: 400;
		color: #000000;
	}
</style>
